#include<stdio.h>
int main()
{   double m=0.0,sum=0.0; 
	int i,n;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{   double grade; 
	    int credit;
		scanf("%d %lf",&credit,&grade);
		m+=credit*grade;
		sum+=credit;
	}
	printf("%.2f\n",m/sum);
	return 0;
}
